#include"maingame.h"
maingame::maingame(QWidget *parent) : QWidget(parent) {
    qDebug()<<"GameScene调用";
    setWindowTitle("maingame");//设置标题
    setFixedSize(800, 545);//设置窗口大小
    Game_Init();
    QTimer::singleShot(1500, this, [=]() {

        timer1 = startTimer(15);
        qDebug()<<"timer1="<<timer1;
        timer3 = startTimer(40);
        qDebug()<<"timer3="<<timer3;
//        game_start = true;
    });
}
void maingame::Game_Init(){
    static int i=0;
    key="null";
    me=new character;
    walls=new Walls(0);
    traps=new Badthings(0);
}
void maingame::timerEvent(QTimerEvent *event){

}
void maingame::keyPressEvent(QKeyEvent *event){
}
void maingame::keyReleaseEvent(QKeyEvent *event){

}
void maingame::paintEvent(QPaintEvent *event){

}
